package br.armx.dao;

import java.util.Locale;

import android.database.Cursor;

public class BaseDao {

	protected String getString(Cursor cursor, String coluna) {
		Locale locale = new Locale("pt", "BR");
		return cursor.getString(cursor.getColumnIndexOrThrow(coluna
				.toUpperCase(locale)));
	}

	protected int getInt(Cursor c, String coluna) {
		Locale locale = new Locale("pt", "BR");
		return c.getInt(c.getColumnIndexOrThrow(coluna.toUpperCase(locale)));
	}

	protected double getDouble(Cursor c, String coluna) {
		Locale locale = new Locale("pt", "BR");
		return c.getDouble(c.getColumnIndexOrThrow(coluna.toUpperCase(locale)));
	}

}
